package com.stefanini.pe.bbva.bp.in.report;


import java.text.AttributedString;
import org.jfree.chart.labels.PieSectionLabelGenerator;
import org.jfree.data.general.PieDataset;

// Referenced classes of package com.piechart.servlet:
//            CustomizePieChart

public class CustomLegendGenerator implements PieSectionLabelGenerator
{

    public String generateSectionLabel(PieDataset dataset, Comparable key)
    {
        String temp = "";
        if(dataset != null)
        {
            temp = key.toString();
            if(temp.contains(":")){
	        	String[] campos= temp.split(":");
	        	return campos[1];
	        }else{
	        	return temp;	        	
	        }
        }
        return temp;
    }

    public AttributedString generateAttributedSectionLabel(PieDataset arg0, Comparable arg1)
    {
        return null;
    }

    public CustomLegendGenerator()
    {
    }
}
